package com.liang.crawlertx2.pojo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.mongodb.core.mapping.Document;

import java.lang.annotation.Target;
import java.time.LocalDateTime;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(collection = "txnews2")
@ExcelTarget("News")
public class News {
    @Excel(name = "编号",width = 30.0,orderNum = "0")
    private String id;
    @Excel(name = "地址",width = 40.0,orderNum = "1")
    private String url;
    @Excel(name = "标题",width = 40.0,orderNum = "2")
    private String title;
    @Excel(name = "新闻来源",width = 20.0,orderNum = "3")
    private String newsSource;
    @Excel(name = "内容",width = 50.0,orderNum = "4")
    private String content;
    @Excel(name = "创建时间",width = 20.0,orderNum = "5")
    private String createdTime;
    @Excel(name = "爬取时间",width = 20.0,orderNum = "6",format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime crawledTime;

}
